<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.pro.bean.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>同一人物设定详细</title>
    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    	<meta http-equiv="description" content="this is my page">
    	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/bootstrap.css">
		<script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
		<script type="text/javascript" src="<%=basePath%>js/jQuery .js"></script>
  </head>
 <%
	List namelist=(List)request.getAttribute("rs");
 	List marklist=(List)request.getAttribute("markrs");
	System.out.println("namelist.size:"+namelist.size()+" "+"marklist.size:"+marklist.size());
	Iterator infoit=namelist.iterator();
	Iterator markit=marklist.iterator();
	Info info=new Info();

%>
  <body>
    <form name="fsuser" action="<%=basePath%>servlet/UpdateSameServlet" method="post">
					
					
				<%//int temp=1;
				int count = 0;
				String temp=null;
				while(infoit.hasNext()) {
					System.out.println("in jsp");
					info=(Info)infoit.next();
					if(temp==null) temp=info.getFirstName();
					Mark mark=(Mark)markit.next();
					System.out.println("info:"+info.getFirstName());
					//Iterator markit=marklist.iterator();
					%>
				<div class="col-lg-10" style="width=100%;height:350px">
				<br/>
				<div class="col-lg-5" style="width:40%;float:left;">
					<hr/><br/><br/><br/>
					<table border="2">
						<tr><td bgcolor="gray"><img width="200px" height="150px" alt="名片正面" src="upload/<%=mark.getCardfront() %>"/>
						</td></tr>
					</table>
				</div>
				<div class="col-lg-7" style="width:60%;float:right">
					<hr/>
					<table class="table table-bordered table-hover"align="right" border="2">
						<tr>
							<td width="40%">姓名</td>
							<td><%=info.getFirstName() %></td>
							
							<input name="infoname" value="<%=temp %>" type="hidden" />
						</tr>
						<tr>
							<td>名片ID</td>
							<td><input name="cardid<%=count %>" value="<%=info.getCardid() %>" type="hidden" /><%=info.getCardid() %></td>
						</tr>
						<tr>
							<td>部门名称</td>
							<td><%=info.getCmp() %></td>
						</tr>
						<tr>
							<td>职务</td>
							<td><%=info.getPost() %></td>
						</tr>
						
						<tr>
							<td>同一人物设定</td>
							<td>
								<select name="mark<%=count %>">
									<%int a=0;
									while(a<=10){
										
										//if(a==mark.getIppaternkub())
											//continue;
										%>
									<option value="<%=a %>"><%=a %></option>
										<%a++;
									}
									%>
							
								<option selected="selected" value="<%=mark.getIppaternkub() %>"><%=mark.getIppaternkub() %></option>
									
								</select>
								
							</td>
						</tr>
						
						<tr>
							<td>录入日期</td>
							<td><%=info.getCrtdate() %></td>
						</tr>
						<tr>
							<td>备注</td>
							<td><input name="memo<%=count %>" value="<%=mark.getRepeatcomment() %>" ></td>
						</tr>
					</table>
				</div>
			</div>
			<%
			count++;
			System.out.println("asdf");
			} %>
			<div>
					<button class="btn btn-sm btn-primary" style="submit">更新</button>
				</div>	
			</form>
  </body>
</html>
